// mircoApp/activityClock/comm/clockItem/clockItem.js
Component({

  /**
   * 组件的属性列表
   */
  options: {
    multipleSlots: true,	// 启用支持多个插槽
    addGlobalClass: true,
  },
  properties: {
    itemObj:{
      type:Object,
      value:{}
    },
    index:{
      type:Number,
      value:0
    },
    startTime:{
      type:String,
      value:''
    },
    partId:Number,
    clockStatus:Number
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    clockTo(event) {
      console.log(event);
      let {id} = event.currentTarget.dataset;

      if(this.data.partId) {
        wx.navigateTo({
          url: `/mircoApp/activityClock/clockDetails/clockDetails?id=${this.data.partId}&activityId=${id}&clockStatus=${this.data.clockStatus}`,
        })
      } else {
        wx.navigateTo({
          url: `/mircoApp/activityClock/clockDetails/clockDetails?id=${id}&activityId=${id}&clockStatus=${this.data.clockStatus}`,
        })
      }
      
    }
  }
})